package cn.hongwei.eduservice.mapper;

import cn.hongwei.eduservice.entity.Course;
import cn.hongwei.eduservice.entity.vo.CourseDetailsVo;
import cn.hongwei.eduservice.entity.vo.CourseInfoVo;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CourseMapper extends BaseMapper<Course> {
    //分页查询讲师对应的发布课程
    List<CourseInfoVo> getCourseInfoVos(Page<CourseInfoVo> page,@Param("ew") QueryWrapper<CourseInfoVo> queryWrapper);

    CourseInfoVo getCourseInfoVoByCourseId(@Param("ew") QueryWrapper<CourseInfoVo> queryWrapper);

    CourseDetailsVo getCourseDetails(String courseId);
}
